﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ARR.Entities;
using ARR.Services.Domain;

namespace ARR.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "CategoriesService" in both code and config file together.
    public class CategoriesService : ICategoriesService
    {
        public List<Category> GetAll()
        {
            return CategoriesDomain.GetAll();
        }

        public List<Category> GetCleanCPCategories()
        {
            return CategoriesDomain.GetCleanCPCategories();
        }

        public List<CategoryUniverse> GetCategoryUniverses()
        {
            return CategoriesDomain.GetCategoryUniverses();
        }

        public List<CategoryRole> GetCategoryRoles()
        {
            return CategoriesDomain.GetCategoryRoles();
        }

        public List<Category> GetByLevel(int level)
        {
            return CategoriesDomain.GetByLevel(level);
        }

        public List<Category> GetByLevels(int level)
        {
            return CategoriesDomain.GetByLevels(level);
        }

        public List<Category> GetByParentId(int parentId)
        {
            return CategoriesDomain.GetByParentId(parentId);
        }

        public void SaveCategoryMatches(List<CategoryMatch> matches)
        {
            CategoriesDomain.SaveCategoryMatches(matches);
        }

        public List<TheoreticalMargin> GetTheoreticalMargins(int countryId)
        {
            return CategoriesDomain.GetTheoreticalMargins(countryId);
        }

        public void SaveTheoreticalMargins(List<TheoreticalMargin> margins)
        {
            CategoriesDomain.SaveTheoreticalMargins(margins);
        }

        public List<CategoryMatch> GetCategoryMatches(int countryId)
        {
            return CategoriesDomain.GetCategoryMatches(countryId);
        }

        public void SaveCategoryMatchesMaster(List<CategoryMatch> matches)
        {
            CategoriesDomain.SaveCategoryMatchesMaster(matches);
        }

        public void SaveHierarchy(List<Category> categories)
        {
            CategoriesDomain.SaveHierarchy(categories);
        }
    }
}
